package com.rustic.server.dto;

import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.rustic.server.po.NationalityDictionary;
import com.rustic.server.dto.base.NationalityDictionaryBaseDTO;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

/**
 * 表[nationality_dictionary]对应UpdateDTO类
 *
 * @author auto
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class NationalityDictionaryUpdateDTO extends NationalityDictionaryBaseDTO {
    /**
     * id
     */
    @NotNull(message = "id不能为空")
    @Min(value = 1, message = "id不能为空")
    @ApiModelProperty(value = "id", dataType = "int")
    private int id;

    /**
     * 国家代码(三位)
     */
    @Length(min = 0, max = 16, message = "国家代码(三位)长度为0-16个字符")
    @ApiModelProperty(value = "国家代码(三位)", dataType = "String")
    private String code;

    /**
     * 国家代码(两位)
     */
    @Length(min = 0, max = 16, message = "国家代码(两位)长度为0-16个字符")
    @ApiModelProperty(value = "国家代码(两位)", dataType = "String")
    private String codeSimple;

    /**
     * 名称
     */
    @Length(min = 0, max = 255, message = "名称长度为0-255个字符")
    @ApiModelProperty(value = "名称", dataType = "String")
    private String name;

    /**
     * 名称(英文)
     */
    @Length(min = 0, max = 255, message = "名称(英文)长度为0-255个字符")
    @ApiModelProperty(value = "名称(英文)", dataType = "String")
    private String nameEn;

    /**
     * 手机区号
     */
    @Length(min = 0, max = 255, message = "手机区号长度为0-255个字符")
    @ApiModelProperty(value = "手机区号", dataType = "String")
    private String mobilePrefix;

    /**
     * 排序权重
     */
    @ApiModelProperty(value = "排序权重", dataType = "int")
    private int sort;


}
